package cn.xuan.zp.service;

public interface IService<T> {
	/***
	 * 新增实体
	 * @param enity
	 * @return
	 * @throws Exception
	 */
	int addEnity(T enity)throws Exception;
	
	/***
	 * 更新实体
	 * @param enity
	 * @return
	 * @throws Exception
	 */
	int updateEnity(T enity)throws Exception;
	
	/***
	 * 通过主键查询
	 * @param id
	 * @return
	 */
	T getByPrimaryKey(long id)throws Exception;
	
	/***
	 * 获取所有实体
	 * @return
	 * @throws Exception
	 */
	Object queryAll()throws Exception;
	
	/***
	 * 根据条件查询实体
	 * @param params
	 * @return
	 * @throws Exception
	 */
	Object queryEnity(Object ...params)throws Exception;
}
